╔T'S YOUR TURN TO DRAW THINGS. ╫HILE WORKING WITH THIS PROGRAM YOU CAN DOODLE, LEARN ABOUT MORE GRAPHIC COMMANDS, SUCH AS ╙╙╚┴╨┼ AND ╟╙╚┴╨┼ AND TO REVIEW SEVERAL ASPECTS OF COLOR WORK IN THE MULTICOLOR MODE.
╘HE DRAWING PROGRAM PERMITS YOU TO DRAW THIN LINES IN COLOR. ╔T'S AN ALL PURPOSE PROGRAM THAT CAN BE USED IN MANY WAYS. ╙OME SECTIONS OF THE PROGRAM CAN BE USED AS BUILDING BLOCKS TO, FOR EXAMPLE, PROGRAMS THAT NEED ANIMATION.
╔T'S A SIMPLE PROGRAM, IT HAS NO PAINTING (FILLING), NO AUTOMATIC DRAWING OF GEOMETRIC FIGURES AS YOU SOMETIMES SEE IN COMMERCIAL PACKAGES, NO FRILLS.
// PRG: DRAW HR/MC //
Ç*FP21
*** ╓┴╥╔┴┬╠┼╙ ***
╟ GRAPHIC MODE: 2=SPLIT HIGH RESOLUTION
4=SPLIT MULTICOLOR
╠╟$ CONTAINS A LIST OF KEYS THAT ARE
RECOGNIZED BY THE PROGRAM
╠╬ IS THE LENGTH OF ABOVE STRING
╩ THE DISPATCHER; CONTAINS WHAT KEY YOU
PRESSED; NUMBER REFERS TO POSITION
IN THE ╠╟$ STRING
─╪(),─┘() ARRAYS HOLD NUMBER OF PIXELS TO MOVE
IN THE CURSOR DIRECTION FOR 4 DIRECTIONS
┴$ ONE PIXEL SMALL CURSOR
├$ REMEMBERS WHAT'S UNDER THE CURSOR AS IT
MOVES OR JUMPS
╪,┘ INITIAL AND DRAWING COORDINATES
├├ CURSOR COLOR
─ DRAW MODE -
┼ ERASE MODE ! OFF: ZERO
═ MOVE MODE ! ON : NOT ZERO
╚ JUMP (HOP) MODE -
*** ╔╬╙╘╥╒├╘╔╧╬╙ ***
╘YPING NOTE: IN LINE 120 THE LONG STRING ╠╟$ TELLS THE COMPUTER WHICH KEYS ARE LEGAL. ╘HE FIRST FOUR CHARACTERS ARE THE CURSOR KEYS IN THE ╥╠─╒ SEQUENCE: RIGHT, LEFT, DOWN, UP. ╠ETTERS ─ ┼ ═ ╩ ╤ FOLLOW. ╘HEN WE TYPE THE COLORS ON THE ├╘╥╠ KEY, FOLLOWED BY THE ONES ON THE LOGO KEY. ╬UMBERS ZERO TO SEVEN FOLLOW, AND THE LAST CHARACTER IS ╚╧═┼. ╔N LINE 125 IN QUOTES TYPE LETTERS ┴ ┬ ├.
╔F YOU PLAN TO TYPE THE USE INSTRUCTIONS IN LINES 300 AND UP, YOU DON'T NEED TO INSERT THE REVERSE CHARACTERS FOR EACH LETTER, UNLESS YOU FEEL LIKE IT. ╔N FACT, YOU DO NOT HAVE TO TYPE THOSE INSTRUCTIONS AT ALL, A ╥┼╘╒╥╬ CODED IN LINE 300 WILL LET YOU WORK THE PROGRAM WITHOUT PRINTING ANY INSTRUCTIONS.
╥╒╬ THE PROGRAM WITH ╟ SET TO EITHER 2 OR 4, DEPENDING ON WHICH GRAPHIC MODE YOU WISH TO TRY. ├HANGE ╟ IN LINE 110 TO DO THAT. ╘HE PROGRAM WILL ADJUST THINGS TO EITHER MODE, WITH ONE EXCEPTION; IN MULTICOLOR MODE HOS OR JUMPS WILL BE TWICE AS BIG.
Ç*FP14
---------------------------------------------
╒ ╙ ┼ ╔ ╬ ╙ ╘ ╥ ╒ ├ ╘ ╔ ╧ ╬ ╙
---------------------------------------------
═ODE SELECTION KEYS: PRESS ANY ONE KEY
IN THIS GROUP. ╘HE SELECTION REMAINS
ENABLED UNTIL YOU PRESS ANOTHER ONE OF THE
KEYS IN THIS GROUP:
─ DRAW
┼ ERASE
═ MOVE 1 PIXEL WITHOUT DRAWING
╩ JUMP 8 PIXELS WITHOUT DRAWING
╤ QUIT THE PROGRAM
Ç*FP8
---------------------------------------------
├OLOR SOURCE SELECTION KEYS:
┴,┬,├ PICK COLOR SOURCE #1 OR 2
OR 3. ╫ATCH COLOR #3 (├). ╫HEN
YOU DRAW WITH IT, AND LATER
CHANGE IT, ALL LINES DRAWN
USING ├ WILL CHANGE COLOR
Ç*FP9
---------------------------------------------
├OLOR:
├╘╥╠/ ├╘╥╠+ NUMBER OR
╠╧╟╧+ LOGO + NUMBER CHANGE THE
NUMBER COLOR OF WHATEVER SOURCE
(┴,┬,├) YOU SELECTED. ╘HIS
IS DISPLAYED IN THE CORNER,
SO YOU CAN SEE WHAT THE
COMPUTER HEARD FROM YOU.
Ç*FP5
---------------------------------------------
╠UMINANCE:
0-7 KEYS CHANGE THE LUMINANCE OF
THE COLOR SOURCE.
Ç*FP12
---------------------------------------------
┴CTION KEYS:
├URSORS WHEN HELD DOWN THEY DRAW,
ERASE, OR JUMP IN THE CURSOR
DIRECTION. ╘HEIR FUNCTION
DEPENDS ON MODE SELECTIONS
TO GO ON A DIAGONAL, PRESS
ALTERNATING HORIZONTAL AND
VERTICAL CURSOR KEYS.
---------------------------------------------
Ç*LN2
╘HE COLOR WORK IS NOT AT ALL EASY TO GRASP UNTIL YOU WORK WITH IT, EXPERIENCE THE JOYS OF COLOR PLOTS AS WELL AS SOME SURPRISES AT THE MEANING OF WORDS SUCH AS "COLOR SOURCE" THAT YOU FIND IN THE MANUAL. ╘HERE IS NO BETTER WAY TO LEARN WHAT THE COMPUTER HAS TO OFFER THAN BY DOING IT.
*** ─┼╘┴╔╠╙ ┴╬─ ╨╥╧╩┼├╘╙ ***
╫E HAVE A SUBSTANTIAL NUMBER OF OPTIONS IN THIS PROGRAM SHOWN IN THE LIST OF LEGAL KEYS IN VARIABLE ╠╟$. ╫E IGNORE ANY OTHER KEYS, NOTE HOW THIS IS HANDLED IN LINE 190 WHERE WE USE THE ╔╬╙╘╥ FUNCTION: THIS IS A COMMAND NEW IN ├OMMODORE ┬ASIC, IT TELLS US THE POSITION OF ONE STRING WITHIN ANOTHER. ╨RECISELY WHAT WE NEED. ╔T RETURNS A ZERO WHEN ╔$ IS NOT MATCHED BY ANY CHARACTERS IN ╠╟$.
─EPENDING ON WHAT KEYS WERE PRESSED, WE HAVE SEVERAL CHOICES TO MAKE. ╩ AND ═ ARE SIMILAR: JUMPS AND MOVES DON'T DRAW. ─ AND ┼ ARE SIMILAR, BOTH DRAW, BUT ONE WITH A REAL COLOR, THE OTHER WITH THE SCREEN COLOR.
╔T MIGHT BE WORTHWILE FOR YOU TO TRACE WHAT THE PROGRAM DOES FOR EACH INPUT LETTER ON A PIECE OF PAPER. ╬OTE THAT EXPRESSIONS SUCH AS THOSE IN LINE 250 ARE LEGAL. ┴N ASSIGNMENT SUCH AS ╚=╚-7*(╩=8) DEPENDS ON THE FACT THAT IF ╩ IS 8, THEN ╩=8 IS MINUS 1, SO WE ULTIMATELY ADD 7 TO ╚ MAKING IT 8. ╙IMILAR PROCEDURE IS USED WITH THE DRAWING COLOR ├├ AS WELL AS SETTING A MOVE FLAG ═.
╘HIS IS A COMPACT WAY OF CODING THINGS TO SAVE YOU TYPING EFFORT. ╔F YOU UNDERSTAND IT TODAY, GREAT! ╔F NOT, DON'T WORRY ABOUT IT, YOU DO NOT HAVE TO KNOW IT RIGHT AWAY, YOU CAN USE PLAIN ╔╞ STATEMENTS IF YOU WISH, BUT THERE WILL BE LOTS OF THEM!
╘HE PROGRAM CAN BE USED IN EITHER THE MULTICOLOR OR THE (SINGLE COLOR) HIGH RESOLUTION MODE. ╠EARN HOW TO CONTROL COLORS IN AN 8X8 CELL. ┘OU SHOULD BE ABLE TO SEE THAT IN THE HIGH-RESOLUTION MODE (╟=2 IN LINE 110) YOU CAN ONLY USE COLOR SOURCE 1 (LABELLED ┴ IN THE PROGRAM), AND THAT IF YOU CHANGE THAT COLOR, SOME ADJACENT POINTS ALSO MAY CHANGE COLOR.
╫HEN YOU USE IT IN THE MULTICOLOR MODE, YOU'LL SEE THAT ANY OF THE THREE COLOR SOURCES CAN BE USED (LABELLED ┴,┬,├) AT INTERSECTIONS OF LINES, BUT THAT, ONCE AGAIN, IF YOU CHANGE THE COLOR (AND THAT INCLUDES LUMINANCE!) IN ONE PLACE, THE NEIGHBORS MIGHT BE AFFECTED IF THEY HAVE BEEN DRAWN WITH THE SAME COLOR SOURCE. ╔F YOU THINK IT'S CONFUSING, YOU ARE NOT ALONE. ╚OPEFULLY, USING THIS PROGRAM AND OBSERVING WHAT COMES OUT IN THE SCREEN WILL REDUCE THE CONFUSION.
╬EEDLESS TO SAY, IF YOU ARE IN THE HIGH-RESOLUTION MODE (╟=1 OR 2), THE COMMANDS DEALING WITH MULTIPLE COLOR SOURCES ARE DISABLED. ╔F YOU ARE IN THE MULTICOLOR MODE ╟=3 OR 4, THE COMMANDS WORK AS DESCRIBED.
╔F YOU WISH, YOU CAN SAVE YOUR DRAWING MASTERPIECE BY FOLLOWING THE INSTRUCTIONS GIVEN IN A SECTION ON SAVING ANY MEMORY, LATER ON IN THE BOOK, BUT DO NOT ATTEMPT IT UNLESS YOU ARE FAIRLY FAMILIAR WITH THE WORKINGS OF THE COMPUTER. ╘HE SAVING PART IS NOT DIFFICULT, BUT SUBSEQUENT LOADING CAN CAUSE TROUBLE. ┘OU HAVE BEEN WARNED.
*** ╙╒══┴╥┘ ***
╘HE COMPUTER, FROM ITS POINT OF VIEW, SUPPORTS TWO KINDS OF GRAPHICS: ╚IGH RESOLUTION AND ═ULTICOLOR.
╔N THE ╚IGH ╥ESOLUTION (╟╥┴╨╚╔├ 1 AND 2) MODE THE SCREEN IS SEEN AS A MATRIX OF 320 POINTS ACROSS AND 200 POINTS DOWN. ╫E GET LOTS OF DETAIL AND SHARPNESS. ╫E LOSE COLORS - YOU MAY ONLY HAVE TWO COLORS PER 8X8 CELL. ┘OU PLOT WITH ├╧╠╧╥1 WHICH IS THE SAME AS THE CURSOR COLOR, THE OTHER COLOR IS THE BACKGROUND COLOR. ┘OU CAN HAVE LOTS OF COLORS ON THE SCREEN BUT ONLY LINES OF THE SAME COLOR CAN INTERSECT WITHOUT AFFECTING EACH OTHER.
╔N THE ═ULTICOLOR MODE (╟╥┴╨╚╔├ 3 AND 4) THE SCREEN IS SEEN AS A MATRIX 160 POINTS ACROSS AND 200 POINTS DOWN. ╫E CAN USE UP TO FOUR COLORS IN ANY 8X8 CELL. ╘HAT MEANS THERE ARE THREE "PEN" COLORS AND THE SCREEN COLOR. ╘HE PLOTS ARE COARSER, BUT CAN BE MORE BEAUTIFUL BECAUSE OF THE ADDED COLOR. ╧NCE AGAIN, YOU CAN HAVE LOTS OF COLORS ON THE SCREEN, BUT ONLY THREE (PLUS THE SCREEN COLOR, OF COURSE) CAN INTERSECT WITHOUT CAUSING TROUBLES TO ADJACENT AREAS.